package com.dmxtechnologies.community.war;


import java.util.List;
import java.util.Map;

import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.faces.bean.RequestScoped;
import javax.inject.Named;

import com.dmxtechnologies.community.monitor.ejb.CMXMonitorBroadcastRemote;
import com.dmxtechnologies.community.monitor.ejb.pojo.MonitorEntity;

@Named("cmsMonitorAccessBean")
@RequestScoped
public class CMSMonitorAccessBean {
	private Map<String, List<MonitorEntity>> monitorEntities;

	public Map<String, List<MonitorEntity>> getMonitorEntities() {
		return monitorEntities;
	}

	public void setMonitorEntities(Map<String, List<MonitorEntity>> monitorEntities) {
		this.monitorEntities = monitorEntities;
	}

	@EJB
	CMXMonitorBroadcastRemote broadcastRemote;

	
	@PostConstruct
	public void init() {
		monitorEntities = broadcastRemote.getMonitorInfo();
	}

}
